if (WikiLook_Overlay._overWikiLinkEvt.indexOf(WikiLookdb_pref.getCharPref("WikiLookShiftParser")+"/wiki/"+encodeURI(pg.ns.list[i].replace(/ /g,"_"))+":")!=-1) return;
++i;
}
var a=document.createElementNS("http://www.w3.org/1999/xhtml",'a');
if (WikiLook_Overlay._overWikiLinkEvt.indexOf(WikiLookdb_pref.getCharPref("WikiLookCtrlParser")+"/wiki/"+encodeURI(pg.ns.list[i].replace(/ /g,"_"))+":")!=-1) return;
++i;
}
var a=document.createElementNS("http://www.w3.org/1999/xhtml",'a');
if (WikiLook_Overlay._overWikiLinkEvt.indexOf(WikiLookdb_pref.getCharPref("WikiLookAltParser")+"/wiki/"+encodeURI(pg.ns.list[i].replace(/ /g,"_"))+":")!=-1) return;
++i;
}
var a=document.createElementNS("http://www.w3.org/1999/xhtml",'a');
if (WikiLook_Overlay._overWikiLinkEvt.indexOf(WikiLookdb_pref.getCharPref("WikiLookMouselookParser")+"/wiki/"+encodeURI(pg.ns.list[i].replace(/ /g,"_"))+":")!=-1) return;
++i;
}
var a=document.createElementNS("http://www.w3.org/1999/xhtml",'a');
this.data=this.data.replace(/\[\[\Image\:\Nuvola apps bookcase\.svg\|30px\|link\=(.*?)\]\]/ig, '<a href="http://fr.wiktionary.org/wiki/Aide:%C3%89tymologies" title="Origine et histoire de « bienvenue »"><img alt="Origine et histoire de « bienvenue »" src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Nuvola_apps_bookcase.svg/30px-Nuvola_apps_bookcase.svg.png" width="30" height="30" /></a>');
this.data=this.data.replace(/\[\[\Image\:\Open book 01\.svg\|30px\|link\=\Aide\:\Types de mots\]\]/ig , '<a href="http://fr.wiktionary.org/wiki/Aide:Types_de_mots" title="Aide:Types de mots"><img alt="Open book 01.svg" src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Open_book_01.svg/30px-Open_book_01.svg.png" width="30" height="30" /></a>');
this.data=this.data.replace(/\[\[Image\:\Nuvola apps edu languages\.svg\|30px\|link\=\Annexe\:\Prononciation\]\]/ig , '<a href="http://fr.wiktionary.org/wiki/Annexe:Prononciation" title="Annexe:Prononciation"><img alt="Nuvola apps edu languages.svg" src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/23/Nuvola_apps_edu_languages.svg/30px-Nuvola_apps_edu_languages.svg.png" width="30" height="30" /></a>');
this.data=this.data.replace('[[File:Books-aj.svg aj ashton 01f.svg|35px|link=Wiktionnaire:Références]]' , '<a href="http://fr.wiktionary.org/wiki/Wiktionnaire:R%C3%A9f%C3%A9rences" title="Wiktionnaire:Références"><img alt="Books-aj.svg aj ashton 01f.svg" src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/Books-aj.svg_aj_ashton_01f.svg/35px-Books-aj.svg_aj_ashton_01f.svg.png" width="35" height="31" /></a>');
"sk": ["Médiá", "Špeciálne", "Diskusia", "Redaktor", "Diskusia s redaktorom", "Wikipédia", "Diskusia k Wikipédii", "Obrázok", "Diskusia k obrázku", "MediaWiki", "Diskusia k MediaWiki", "Šablóna", "Diskusia k šablóne", "Pomoc", "Diskusia k pomoci", "Kategória", "Diskusia ku kategórii"],
newOption('popupDabRegexp', '([{][{]\\s*disambig|disambig\\s*[}][}]|disamb\\s*[}][}]|dab\\s*[}][}])|[{][{]\\s*(((geo|hn|road?|school|number)dis)|[234][lc][acw]|shipindex)(\\s*[|][^}]*)?\\s*[}][}]|is a .*disambiguation.*page');
newOption('popupStubRegexp', '(sect)?stub[}][}]|This .*-related article is a .*stub');
'SearchHint': 'Find English Wikipedia articles containing %s',
'web': 'web',
'global': 'global',
'globalSearchHint': 'Search across Wikipedias in different languages for %s',
'googleSearchHint': 'Google for %s',
/////////////////////////////////////
// article-related actions and info
// (some actions also apply to user pages)
/////////////////////////////////////
'actions': 'actions', ///// view articles and view talk
'popupsMenu': 'popups',
'togglePreviewsHint': 'Toggle preview generation in popups on this page',
'enable previews': 'enable previews',
'disable preview': 'disable previews',
'toggle previews': 'toggle previews',
'show preview': 'show preview',
'reset': 'reset',
'more...': 'more...',
'disable': 'disable popups',
'disablePopupsHint': 'Disable popups on this page. Reload page to re-enable.',
'historyfeedHint': 'RSS feed of recent changes to this page',
'purgePopupsHint': 'Reset popups, clearing all cached popup data.',
'PopupsHint': 'Reset popups, clearing all cached popup data.',
'spacebar': 'space',
'view': 'view',
'view article': 'view article',
'viewHint': 'Go to %s',
'talk': 'talk',
'talk page': 'talk page',
'this revision': 'this revision',
'revision %s of %s': 'revision %s of %s',
'Revision %s of %s': 'Revision %s of %s',
'the revision prior to revision %s of %s': 'the revision prior to revision %s of %s',
'Toggle image size': 'Click to toggle image size',
'del': 'del', ///// delete, protect, move
'delete': 'delete',
'deleteHint': 'Delete %s',
'undeleteShort': 'un',
'UndeleteHint': 'Show the deletion history for %s',
'protect': 'protect',
'protectHint': 'Restrict editing rights to %s',
'unprotectShort': 'un',
'unprotectHint': 'Allow %s to be edited by anyone again',
'move': 'move',
'move page': 'move page',
'MovepageHint': 'Change the title of %s',
'edit': 'edit', ///// edit articles and talk
'edit article': 'edit article',
'editHint': 'Change the content of %s',
'edit talk': 'edit talk',
'new': 'new',
'new topic': 'new topic',
'newSectionHint': 'Start a new section on %s',
'null edit': 'null edit',
'nullEditHint': 'Submit an edit to %s, making no changes ',
'hist': 'hist', ///// history, diffs, editors, related
'history': 'history',
'historyHint': 'List the changes made to %s',
'last': 'last',
'lastEdit': 'lastEdit',
'mark patrolled': 'mark patrolled',
'markpatrolledHint': 'Mark this edit as patrolled',
'show last edit': 'most recent edit',
'Show the last edit': 'Show the effects of the most recent change',
'lastContrib': 'lastContrib',
'last set of edits': 'latest edits',
'lastContribHint': 'Show the net effect of changes made by the last editor',
'cur': 'cur',
'diffCur': 'diffCur',
'Show changes since revision %s': 'Show changes since revision %s',
'%s old': '%s old', // as in 4 weeks old
'oldEdit': 'oldEdit',
'purge': 'purge',
'purgeHint': 'Demand a fresh copy of %s',
'raw': 'source',
'rawHint': 'Download the source of %s',
'render': 'simple',
'renderHint': 'Show a plain HTML version of %s',
'Show the edit made to get revision': 'Show the edit made to get revision',
'sinceMe': 'sinceMe',
'changes since mine': 'diff my edit',
'sinceMeHint': 'Show changes since my last edit',
'Couldn\'t find an edit by %s\nin the last %s edits to\n%s': 'Couldn\'t find an edit by %s\nin the last %s edits to\n%s',
'eds': 'eds',
'editors': 'editors',
'editorListHint': 'List the users who have edited %s',
'related': 'related',
'relatedChanges': 'relatedChanges',
'related changes': 'related changes',
'RecentchangeslinkedHint': 'Show changes in articles related to %s',
'editOld': 'editOld', ///// edit old version, or revert
'rv': 'rv',
'revert': 'revert',
'revertHint': 'Revert to %s',
'defaultpopupRedlinkSummary': 'Removing link to empty page [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupFixDabsSummary': 'Disambiguate [[%s]] to [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupFixRedirsSummary': 'Redirect bypass from [[%s]] to [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupExtendedRevertSummary': 'Revert to revision dated %s by %s, oldid %s using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupRevertToPreviousSummary': 'Revert to the revision prior to revision %s using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupRevertSummary': 'Revert to revision %s using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupQueriedRevertToPreviousSummary': 'Revert to the revision prior to revision $1 dated $2 by $3 using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupQueriedRevertSummary': 'Revert to revision $1 dated $2 by $3 using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupRmDabLinkSummary': 'Remove link to dab page [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'Redirects': 'Redirects', // as in Redirects to ...
' to ': ' to ', // as in Redirects to ...
'Bypass redirect': 'Bypass redirect',
'Fix this redirect': 'Fix this redirect',
'disambig': 'disambig', ///// add or remove dab etc.
'disambigHint': 'Disambiguate this link to [[%s]]',
'Click to disambiguate this link to:': 'Click to disambiguate this link to:',
'remove this link': 'remove this link',
'remove all links to this page from this article': 'remove all links to this page from this article',
'remove all links to this disambig page from this article': 'remove all links to this disambig page from this article',
'Category members (%s shown)': 'Category members (%s shown)',
'No image links found': 'No image links found',
'File links': 'File links',
'No image found': 'No image found',
'Image from Commons': 'Image from Commons',
'Description page': 'Description page',
/////////////////////////////////////
// user-related actions and info
/////////////////////////////////////
'user': 'user', ///// user page, talk, email, space
'user page': 'user page',
'user talk': 'user talk',
'edit user talk': 'edit user talk',
'leave comment': 'leave comment',
'email': 'email',
'email user': 'email user',
'EmailuserHint': 'Send an email to %s',
'space': 'space', // short form for userSpace link
'PrefixindexHint': 'Show pages in the userspace of %s',
'count': 'count', ///// contributions, log
'edit counter': 'edit counter',
'editCounterLinkHint': 'Count the contributions made by %s',
'contribs': 'contribs',
'contributions': 'contributions',
'deletedContribs': 'deleted contributions',
'DeletedcontributionsHint': 'List deleted edits made by %s',
'ContributionsHint': 'List the contributions made by %s',
'log': 'log',
'user log': 'user log',
'userLogHint': 'Show %s\'s user log',
'arin': 'ARIN lookup', ///// ARIN lookup, block user or IP
'Look up %s in ARIN whois database': 'Look up %s in the ARIN whois database',
'unblockShort': 'un',
'block': 'block',
'block user': 'block user',
'IpblocklistHint': 'Unblock %s',
'BlockipHint': 'Prevent %s from editing',
'block log': 'block log',
'blockLogHint': 'Show the block log for %s',
'protectLogHint': 'Show the protection log for %s',
'pageLogHint': 'Show the page log for %s',
'deleteLogHint': 'Show the deletion log for %s',
'Invalid %s %s': 'The option %s is invalid: %s',
'No backlinks found': 'No backlinks found',
' and more': ' and more',
'undo': 'undo',
'undoHint': 'undo this edit',
'Download preview data': 'Download preview data',
'Invalid or IP user': 'Invalid or IP user',
'Not a registered username': 'Not a registered username',
'BLOCKED': 'BLOCKED',
' edits since: ': ' edits since: ',
/////////////////////////////////////
// Autoediting
/////////////////////////////////////
'Enter a non-empty edit summary or press cancel to abort': 'Enter a non-empty edit summary or press cancel to abort',
'Failed to get revision information, please edit manually.\n\n': 'Failed to get revision information, please edit manually.\n\n',
'The %s button has been automatically clicked. Please wait for the next page to load.': 'The %s button has been automatically clicked. Please wait for the next page to load.',
'Could not find button %s. Please check the settings in your javascript file.': 'Could not find button %s. Please check the settings in your javascript file.',
var WikiLookdb_pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("extensions.WikiLook.");
this._wordMonTimer = null; // word monitor timer object
this._mainWindow = null;
this._currentDoc = null;
this._shiftKey = null;
this._ctrlKey = null;
this._altKey = null;
this._eventButton= null;
this._initialized = true;
this._event=null;
this._eventRangeParent = null;
this._eventRangeOffset = null;
this._eventTarget = null;
this._event = null;
this._eventClientX = null;
this._eventClientY = null;
this._wordX = null;
this._wordY = null;
this._currentWord = "";
this._lastWord = "";
this._wordMonTimer = null;
this._pref_WordMonTimerDelay = 800; // in miliseconds
this._pref_HideWhenMouseMove = false; // hide definition when mouse moves
this._pref_WindowOffsetX = 6;
this._pref_WindowOffsetY = 6;
this._pref_BlockBasicWords = true;
this._divId = "WikiLook_overlay_layout";
this._div = null;
this._divIsDisplayed = false;
this._showDefinition = false;
this._audioLinkShown = false;
this._isRequestFetching = false;
this._statusImageId = "WikiLook_StatusImage";
this._mainLanguage = "English";
this._outTextForFormOf = "";
this._mainLngFound = false;
this._defFound = false;
this._goForIt = false;
this._thisIsAFormOf=false;
this._thisIsAFormOfFormOf=false; //let entries like [[realised]], past form of [[realise]], alternate spelling of [[realize]], but still preventing more then 3 form of look ups
if ((this._eventButton==2&&this._altKey)||(this._eventButton==2&&this._ctrlKey)||(this._eventButton==2&&this._shiftKey)) {
try {
if (typeof event.originalTarget.childNodes[1]!="undefined"&&typeof event.originalTarget.childNodes[1].offsetParent!="undefined") {
if (event.originalTarget.parentNode.parentNode.id.indexOf("navpopup_maindiv")==0||event.originalTarget.parentNode.id.indexOf("navpopup_maindiv")==0||event.originalTarget.childNodes[1].offsetParent.id.indexOf("navpopup_maindiv")==0||event.originalTarget.offsetParent.id.indexOf("navpopup_maindiv")==0) {
this._insideDivLookup=true;
this.clearAllButScreen();
} else {
this._insideDivLookup=false;
}
} else {
if (event.originalTarget.parentNode.parentNode.id.indexOf("navpopup_maindiv")==0||event.originalTarget.parentNode.id.indexOf("navpopup_maindiv")==0||event.originalTarget.offsetParent.id.indexOf("navpopup_maindiv")==0) {
this._insideDivLookup=true;
this.clearAllButScreen();
} else {
this._insideDivLookup=false;
}
}
} catch (err) { this._insideDivLookup=false; }
}
if ( this._eventTarget.tagName == "SELECT") return;
this.clearWordMonTimer();
this._currentDoc = this.getDoc(event);
this._eventTarget = event.target;
//if ( this._eventTarget.tagName != "SELECT") {
this._eventRangeParent = event.rangeParent;
this._eventRangeOffset = event.rangeOffset;
this._eventClientX = event.clientX;
this._eventClientY = event.clientY;
this._shiftKey = event.shiftKey;
this._ctrlKey = event.ctrlKey;
this._altKey = event.altKey;
this._eventButton = event.button;
if (this._eventButton==2&&(this._altKey||this._ctrlKey||this._shiftKey)) {
if (this._currentParser.indexOf("wiktionary")!=-1&&this._currentParser.indexOf("de.wiktionary")==-1) this._currentWord=this._currentWord.toLowerCase();
var a=document.createElementNS("http://www.w3.org/1999/xhtml",'a');
if (WikiLookdb_pref.getBoolPref("WikiLookAltSmartLookupEnabled")&&this._currentParser.indexOf("wiktionary")==-1){this.GoogleIt(); return}; pg.wiki.hostname=this._currentParser.substring(7,this._currentParser.length);
setSiteInfo();
setMainRegex();
setTitleBase();
setNamespaces();
setRegexps();
if (this._currentParser.indexOf("wiktionary")!=-1&&this._currentParser.indexOf("de.wiktionary")==-1) this._currentWord=this._currentWord.toLowerCase();
var a=document.createElementNS("http://www.w3.org/1999/xhtml",'a');
if (this._currentParser.indexOf("wiktionary")!=-1&&this._currentParser.indexOf("de.wiktionary")==-1) this._currentWord=this._currentWord.toLowerCase();
var a=document.createElementNS("http://www.w3.org/1999/xhtml",'a');
} else { //here we run event that binded to mousecall property
if (!WikiLookdb_pref.getBoolPref("WikiLookMouselookEnabled")) { /*this.clearAll();*/ return};
try {
if (typeof evt.originalTarget.childNodes[1]!="undefined"&&typeof evt.originalTarget.childNodes[1].offsetParent!="undefined") {
if (evt.originalTarget.parentNode.parentNode.id.indexOf("navpopup_maindiv")==0||evt.originalTarget.parentNode.id.indexOf("navpopup_maindiv")==0||evt.originalTarget.childNodes[1].offsetParent.id.indexOf("navpopup_maindiv")==0||evt.originalTarget.offsetParent.id.indexOf("navpopup_maindiv")==0) {
this._insideDivLookup=true;
} else {
this._insideDivLookup=false;
}
} else {
if (evt.originalTarget.parentNode.parentNode.id.indexOf("navpopup_maindiv")==0||evt.originalTarget.parentNode.id.indexOf("navpopup_maindiv")==0||evt.originalTarget.offsetParent.id.indexOf("navpopup_maindiv")==0) {
if (this._currentParser.indexOf("wiktionary")!=-1&&this._currentParser.indexOf("de.wiktionary")==-1) this._currentWord=this._currentWord.toLowerCase();
var a=document.createElementNS("http://www.w3.org/1999/xhtml",'a');
if (this._currentParser.indexOf("wiktionary")!=-1&&this._currentParser.indexOf("de.wiktionary")==-1) this._currentWord=this._currentWord.toLowerCase();
var a=document.createElementNS("http://www.w3.org/1999/xhtml",'a');
if (this._currentParser.indexOf("wiktionary")!=-1&&this._currentParser.indexOf("de.wiktionary")==-1) this._currentWord=this._currentWord.toLowerCase();
var a=document.createElementNS("http://www.w3.org/1999/xhtml",'a');
if (this._currentParser.indexOf("wiktionary")!=-1&&this._currentParser.indexOf("de.wiktionary")==-1) this._currentWord=this._currentWord.toLowerCase();
var a=document.createElementNS("http://www.w3.org/1999/xhtml",'a');
if (this._currentParser.indexOf("wiktionary")!=-1&&this._currentParser.indexOf("de.wiktionary")==-1) this._currentWord=this._currentWord.toLowerCase();
var a=document.createElementNS("http://www.w3.org/1999/xhtml",'a');